<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<style>
	ul{list-style:none;}
	li{float:left}
	a{text-decoration:none;display:block;background-color:#ccc;text-indent:10px;
	margin-bottom:1px;height:30px;line-height:30px;width:100px;}
	a:hover{background-color:#f60;color:#fff}
</style>
<table width="900" bgcolor="#FEF5BE">
   <tr>
       <td height="120" bgcolor="#50e3a6" align="center"><font color="white" size="300px">图书管理系统</font></td>
   </tr>
  <s:if test="#session.user!=null">
   <tr>
		<td height="30">
                <s:property value="#session.user.userName"/>，欢迎回来！&nbsp;&nbsp;
            <s:if test='#session.user.role=="2"'>
            <ul>
             <li><a href="<s:url value="/user_modifyInfo.action"/>?userid=<s:property value="#session.user.userId"/>">个人信息</a></li> 
                <li><a href="<s:url value="/book_list.action"/>">书籍列表</a> </li>
                <s:iterator value="cateList" id="c">
                    <li><a href="<s:url value="/book_list.action"/>?categoryId=<s:property value="#c.categoryId"/>"><s:property value="#c.categoryName"/></a> </li>
                </s:iterator>
                <li><a href="<s:url value="/lend_list.action"/>">我的借书</a> </li>
                <li><a href="<s:url value="/user_modifyPass.action"/>">密码修改</a></li>
                <li><a href="<s:url value="/user_logout.action"/>">退出</a>&nbsp;</li>
		    </s:if>
            <s:elseif test='#session.user.role=="1"'>
                <a href="<s:url value="/bookmanager_list.action"/>">书籍管理</a>|
                <a href="<s:url value="/manager_userlist.action"/>">读者列表</a>|
                <a href="<s:url value="/manager_lendlist.action"/>">借书管理</a>|
                <a href="<s:url value="/user_modifyPass.action"/>">密码修改</a>|
                <a href="<s:url value="/user_logout.action"/>">退出</a>&nbsp;
            </s:elseif>
            </ul>
		</td>
   </tr>
  </s:if>
</table>


